package com.janke.softballnexus.client.events;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class RetrieveAllDivisions extends GwtEvent<RetrieveAllDivisions.Handler> {

	public static Type<Handler> TYPE = new Type<Handler>();

	public interface Handler extends EventHandler {
		void onLoadDivisions();
	}

	@Override
	public Type<Handler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(Handler handler) {
		handler.onLoadDivisions();
	}

	public static void register(EventBus bus, Handler handler) {
		bus.addHandler(TYPE, handler);
	}

}
